// store.js
import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    isFirstVisit: true, // 默认值设为true，表示用户首次访问
  },
  getters: {
    getNoticeCurrent: state => state.isFirstVisit,
  },
  mutations: {
    setFirstVisit(state, value) {
      state.isFirstVisit = value;
    },
  },
  actions: {
    updateFirstVisit({ commit }, value) {
      commit('setFirstVisit', value);
    },
  },
});


